<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:shiro="http://shiro.apache.org/tags">
    <h:head>
        <title>YAP</title>
        <h:outputStylesheet name="css/jsfcrud.css"/>
        <link rel="shortcut icon" type="image/x-icon" href="#{request.contextPath}/resources/yap.ico"/>
        <style>
            #dvLoading
            {
                height: 200px;
                width: 450px;
                position: fixed;
                z-index: 1000;
                left: 35%;
                top: 30%;
                margin-bottom: 100px;
                //  margin: -15px 0 0 -15px;
            }
            .ui-widget, .ui-widget .ui-widget{  font-size: 13px; }
            .teble{
                margin-left: 40px;
            }
            .bg {
                background-image: url("resources/master1.jpg");
            }
        </style>
        <script>
            history.forward();
        </script>
    </h:head>
    <h:body styleClass="bg">
        <h:form id="dvLoading">
            <p:panel  header="Yamadhara Authentication Protocol v.1">
                <p:graphicImage value="/resources/yappizle.png" style="float: right"></p:graphicImage>
                <shiro:hasRole name="admin">
                    <table border="0" class="teble">
                        <tr><td><p:commandLink styleClass="ui-icon ui-icon-folder-collapsed" action="/uploads/List"/></td><td><h:link outcome="/uploads/List" value="Uploads"/></td></tr>
                        <tr><td><p:commandLink styleClass="ui-icon ui-icon-folder-collapsed" action="/userrole/List"/></td><td><h:link outcome="/userrole/List" value="User roles"/></td></tr>
                        <tr><td><p:commandLink styleClass="ui-icon ui-icon-person" action="/users/List"/></td><td><h:link outcome="/users/List" value="System Users"/></td></tr>
                        <tr><td><p:commandLink styleClass="ui-icon ui-icon-folder-collapsed" action="attribs.jsp"/></td><td><a href="attribs.jsp">Proceed</a></td></tr>
                        <tr><td><h:form><p:commandLink id="logout" styleClass="ui-icon ui-icon-power" action="#{logout.submit}"/></h:form></td><td><h:form><h:link outcome="login.xhtml" value="Logout"/></h:form></td></tr>
                    </table>
                </shiro:hasRole>
                <shiro:hasRole name="user">
                    <table border="0" class="teble">
                        <tr><td><p:commandLink styleClass="ui-icon ui-icon-folder-collapsed" action="/uploads/List"/></td><td><h:link outcome="/uploads/List" value="Uploads"/></td></tr>
                        <tr><td><h:form><p:commandLink id="logout" styleClass="ui-icon ui-icon-power" action="#{logout.submit}"/></h:form></td><td><h:form><h:link outcome="login.xhtml" value="Logout"/></h:form></td></tr>
                        <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
                        <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
                        <tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
                    </table>
                </shiro:hasRole>
            </p:panel>
        </h:form>
    </h:body>
</html>

